package com.xxxy.controller;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.xxxy.blockhandler.MonitorBlockHandler;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MonitorController {

    @GetMapping("/monitor/hello")
    @SentinelResource(value = "helloResource",blockHandler = "helloBlockHandler",
    blockHandlerClass = MonitorBlockHandler.class)
    public String hello() {
        return "Hello sentinel" ;
    }
    @GetMapping(value = "/associate")
    public String associate() {
        return "我是关联接口";
    }
}
